package com.cx.controller.lcd;

import com.cx.constant.ConstantData;
import com.cx.pojo.Community;
import com.cx.service.lcd.CommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("community")
public class CommunityController {

    @Autowired
    private CommunityService communityService;

    @RequestMapping("communitylist")
    @ResponseBody
    public List<Community> selectAll() {
        List<Community> communities = communityService.selectByCommunityId();
        return communities;
    }
}
